package main

import "strings"

import (
	"github.com/lxn/walk"
	. "github.com/lxn/walk/declarative"
)

func main() {
	mainWindow.Run()
}

var inTE, outTE *walk.TextEdit
var mainWindow = MainWindow{
	Icon:    "boy.ico",
	Title:   "大小写转换测试",
	MinSize: Size{600, 400},
	Layout:  VBox{},
	Children: []Widget{
		HSplitter{
			Children: []Widget{
				TextEdit{AssignTo: &inTE, MaxLength: 100},
				TextEdit{AssignTo: &outTE, ReadOnly: true},
			},
		},
		PushButton{
			Text: "SCREAM",
			OnClicked: func() {
				outTE.SetText(strings.ToUpper(inTE.Text()))
			},
		},
	},
}
